package com.system.test.service;

import com.system.test.bean.Patient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.List;

/**
 * @InterfaceName: PatientService
 * @description: TODO 类描述
 * @author: Li Chuanwei
 * @date: 2023/11/12 17:04
 **/
@FeignClient(value = "patient-service", path = "/patient")
public interface PatientService {
    @PostMapping("/save")
    boolean savePatient(Patient patient);

    @DeleteMapping("/del/{id}")
    boolean removePatientById(int id);

    @PutMapping("/update")
    boolean modifyPatient(Patient patient);

    @GetMapping("/get/{id}")
    Patient getPatientById(int id);

    @GetMapping("/get/list")
    List<Patient> listAllPatients();
}
